#Requires AutoHotkey v2.0

inputString := "asd{1}#启动{1}sds"
resultArray := []
regex := "(\{.*?\})"
index := 1

C_auto_increment(){

    global resultArray
    static variable := false ; 判断字符是属于变量字符还是常规字符
    static tempStr1 := ""
    static tempStr2 := ""
    loop parse, inputString{
        
        if(A_LoopField = "{"){
            variable := true
            resultArray.Push(tempStr1)
        }
    
        if(variable){
            tempStr2 .= A_LoopField
        }else{
            tempStr1 .= A_LoopField
        }
        
        if(A_LoopField = "}"){
            variable := false
            resultArray.Push(tempStr2)
        }
        
    }
}
C_auto_increment()
loop {
    MsgBox(index " is " resultArray[index])
    index++
    if(index > resultArray.Length){
        break
    }
}
